<script type="text/javascript" src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script> 
<link rel="stylesheet" type="text/css" href="__STATIC__/css/common.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/css/main.min.css">
<div class="fn-cms-top">
<adv pid="1" limit="1" item="v">
<div fnp="m-top-banner" style="background:{$v.bgcolor};" class="m-top-banner rel editable" moduleId="2010053" style="position:relative;min-height:35px;">
	 <div class="bar container">
	 	<a class="img-small" <if condition="$v['target'] eq 1">target="_blank"</if> href="{$v.ad_link}"> <img class="img100" src="{$v[ad_code]}"  title="{$v[title]}" style="{$v[style]}"/></a>   
	 </div>
	 <i data-role="close" class="icon icon-close"></i>
</div>
</adv>
<div class="m-top-bar editable" moduleId="1539923" style="position:relative;min-height:25px;">
  <div class="container">
    <ul class="fl">
      <li class="fl J_login_status dn nologin">
      	<a class="menu-item fl J_do_login J_chgurl" href="{:U('Home/user/login')}">
        <span>Hi，请登录</span> </a><a class="menu-item fl ht" href="{:U('Home/user/reg')}">免费注册</a>
      </li>
      <li class="fl J_login_status dn islogin"><a href="{:U('Home/user/index')}" class="userinfo" title="" target="_self"></a>
      	<a href="{:U('Home/user/logout')}" style="margin:0 10px;" title="退出" target="_self">退出</a></li>
      <li class="fl sep"></li>
      <!-- 
      <li class="fl select-city dropdown">
        <span class="menu-item">
        <span>送货至：</span>
        <a title="" alt="" href="" class="J_cur_place"></a><i class="dd"></i></span>
      </li>-->
    </ul>
    <ul class="fr bar-right">
      <li class="fl dropdown my-feiniu"><a class="menu-item" target="_blank" href="{:U('Home/Newjoin/index')}">
        <span>商家入驻</span><i class="dd"></i></a>
        <ul class="sub-panel">
          <li><a class="J_chgurl" target="_blank" href="{:U('/seller/Admin/login')}">商家登录</a></li>
        </ul>
      </li>
      <li class="fl dropdown my-feiniu"><a class="menu-item" target="_blank" href="{:U('/Home/User/index')}">
        <span>我的商城</span>
        <i class="dd"></i></a>
        <ul class="sub-panel">
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/order_list')}">我的订单</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/account')}">我的积分</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/coupon')}">我的优惠券</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/goods_collect')}">我的收藏夹</a></li>
          <li><a class="J_chgurl" target="_blank" href="{:U('/Home/User/comment')}">我的评论</a></li>
        </ul>
      </li>
      <li class="fl sep"></li> 
      <li class="fl dropdown mobile-feiniu"><a class="menu-item" href=""><i class="fl ico"></i>
        <span class="fl">手机TPshop网</span>
        <i class="dd"></i></a>
        <div class="sub-panel m-lst">
          <p>扫一扫，下载TPshop客户端</p>
          <dl>
            <dt class="fl mr10"><a target="_blank" href=""><img height="80" width="80" src="__STATIC__/images/qrcode_vmall_app01.png"></a></dt>
            <dd class="fl mb10"><a target="_blank" href=""><i class="andr"></i> Andiord</a></dd>
            <dd class="fl"><a target="_blank" href=""><i class="iph"></i> iPhone</a></dd>
          </dl>
        </div>
      </li>
      <li class="fl sep"></li>
      <li class="fl"><a class="menu-item" href="{:U('Home/Article/detail',array('article_id'=>17))}" target="_blank">
        <span>帮助中心</span></a></li>
      <li class="fl sep"></li>
      <li class="fl about-us"><a class="txt fl" style="line-height:unset;" href="">关注我们：</a></li>
      <li class="fl dropdown weixin"><a href="" class="fl ico"></a>
        <div class="sub-panel wx-box">
          <span class="arrow-b">◆</span>
          <span class="arrow-a">◆</span>
          <p class="n"> 扫描二维码 <br>	关注TPshop网官方微信 </p>
          <img src="__STATIC__/images/qrcode_vmall_app01.png"></div>
      </li>
    </ul>
  </div>
</div>


<div class="m-top-sidebar m-sdb-sale J-sdb " moduleId="2026855" style="z-index:401;" fnp="m-top-sidebar">
  <div class="t-main">
    <div class="tb-tabs">
      <div class="tb-tabs-up">
      	<a href="{:U('Home/Cart/cart')}" class="i-cart" data-role="ico-cart">
        <span class="text">购物车</span><span id ="miniCartRightQty" class="num"></span></a>
        <a href="{:U('/Home/User/order_list')}" target="_blank" class="i-ico i-ico-order" data-role="ico-btn">
        <span>我的订单</span><i class="demo-icon">&#xe807;</i></a>
        <a href="{:U('/Home/User/coupon')}" target="_blank" class="i-ico i-ico-coupon" data-role="ico-btn">
        <span>我的优惠券</span><i class="demo-icon">&#xe80f;</i></a>
        <a href="{:U('/Home/User/goods_collect')}" target="_blank" class="i-ico i-ico-fav" data-role="ico-btn">
        <span>我的收藏</span><i class="demo-icon">&#xe808;</i></a>
        <a href="{:U('/Home/User/comment')}" target="_blank" class="i-ico i-ico-foot" data-role="ico-btn">
        <span>我的评论</span><i class="demo-icon">&#xe805;</i></a>
      </div>
      <div class="tb-tabs-down">
        <a href="" target="_blank" class="i-ico i-ico-ur" data-role="ico-btn">
        <span>意见反馈</span>
        <i></i></a><a href="" class="i-ico i-ico-gotop" data-role="ico-gotop"><em></em>
        <span>返回顶部</span>
        <i></i></a></div>
      <div class="my-cart-shim"></div>
    </div>
    <div class="my-cart">
      <div class="mn-c-top" ><a href="{:U('Home/Cart/cart')}">我的购物车</a><i data-role="cart-close-btn"></i></div>
      <div class="sub-panel u-fn-cart u-mn-cart">
        <div id="miniCartRight"></div>
        <div class="empty-c fn-hide">
          <span class="ma"><i class="c-i oh"></i>购物车中没有TPshop商品哟！</span>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="m-top-search editable" moduleId="1539927" style="position:relative;min-height:35px;">
  <div class="container">
    <div class="logo fl">
    	<a href="/" target="_blank" class="item fl"><img height="60" width="160" src="{$tpshop_config['shop_info_store_logo']}"></a>
    	<!-- <a href="" target="_blank" class="item fl"><img height="60" width="140" src="__STATIC__/images/csmrrvbluvoamtx8aaeoswlm7gg007.gif"></a>-->
    </div>
    <div fnp="m-top-search-form" class="m-top-search-form fl">
     <form name="sourch_form" id="sourch_form" method="post" action="{:U("/Home/Goods/search")}">
        <div data-role="form-inner" class="s-form"><i class="s-ico"></i>         
		 <input type="text" data-role="input-search" autocomplete="off" class="fl s-input" name="q" id="q" value="<?php echo I('q'); ?>" placeholder="搜索关键字"/>
          <a data-role="btn" href="javascript:void(0);" class="s-btn fl" onclick="if($.trim($('#q').val()) != '') $('#sourch_form').submit();">搜索</a>
        </div>
        <div class="s-hotword">
        	<foreach name="tpshop_config.hot_keywords" item="wd" key="k">
				<a href="{:U('Home/Goods/search',array('q'=>$wd))}" <if condition="$wd eq I('q')">class="ht"</if>>{$wd}</a>
        	</foreach>
        </div>
        <ul data-role="tip-list" class="s-tip-list">
        </ul>
      </form>
    </div>
    <div class="my-cart fr" id="hd-my-cart">
      <p class="c-n fl">我的购物车</p>
      <p class="c-num fl quantity">(<span class="count cart_quantity" id="cart_quantity"></span>) <i class="i-c oh"></i></p>
      <div id="show_minicart" class="sub-panel u-fn-cart u-mn-cart">
        <div id="minicart" class="minicartContent">

        </div>
      </div>
    </div>
  </div>
</div>

<div class="m-top-nav editable" moduleId="1539926" style="position:relative;min-height:35px;">
  <div class="main-container new-year">
    <div class="main-title-wrap"><a href="" target="_blank" class="main-title">
      <span class="ico"><i class="il il-lt"></i><i class="il il-lc"></i><i class="il il-lb"></i>
      <i class="il il-rt"></i><i class="il il-rc"></i><i class="il il-rb"></i></span>商城商品分类</a>
      <!--  <div class="nav-list" fnp="nav-list">
        <ul class="nav-list-warpper">
        </ul>
      </div>-->
    </div>
     
    <ul class="main-nav">
      <li class="nav-item"><a class="menu-item <if condition=" CONTROLLER_NAME eq 'Index' ">menu-item-active"</if> target="_blank" href="/" style="overflow: visible;">首页 </a></li>
      <tpshop sql="SELECT * FROM `__PREFIX__navigation` where is_show = 1 ORDER BY `sort` DESC" key="k" item='v'>
       <li class="nav-item"><a  style="overflow: visible;"   href="{$v[url]}" 
       		<?php  if($_SERVER['REQUEST_URI']==str_replace('&amp;','&',$v[url])){ echo "class='menu-item menu-item-active'";}
       		else{ echo "class='menu-item'"; } ?>> {$v[name]} </a></li>
      </tpshop>
      <li class="nav-item"><a class="menu-item "  href="javascript:void();" style="overflow: visible;">TPshop商城<i class="e-hot"></i></a></li>
    </ul>     
    </div>
</div>
<div>
  <div class="J_side_nav_trigger"></div>
</div>
</div>
<script type="text/javascript"> 
$(document).ready(function(){
	get_cart_num();
	var uname= getCookie('uname');
	if(uname == ''){
		$('.islogin').remove();
		$('.nologin').show();
	}else{
		$('.nologin').remove();
		$('.islogin').show();
		$('.userinfo').html(decodeURIComponent(uname));
	}
});

function get_cart_num(){
   var cart_cn = getCookie('cn');
   if(cart_cn == ''){
	$.ajax({
		type : "GET",
		url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
		success: function(data){								 
			cart_cn = getCookie('cn');
			$('#cart_quantity').html(cart_cn);					
		}
	});	
  }
  $('#cart_quantity').html(cart_cn);
  $('#miniCartRightQty').html(cart_cn);
}
</script>